﻿using xu.MinFileLogger;

Console.WriteLine("Hello, World!");

Logger.Init(@"D:\wwwroot\minlog");

//List<ManualResetEvent>? manualResetEvents = new List<ManualResetEvent>();
//ThreadPool.SetMaxThreads(10, 10);
//for (int i = 0; i < 64; i++)
//{
//    var mre = new ManualResetEvent(false);
//    manualResetEvents.Add(mre);
//    ThreadPool.QueueUserWorkItem(t =>
//    {
//        $"编号LogError:{Thread.CurrentThread.ManagedThreadId}".LogError();
//        $"编号LogInfo:{Thread.CurrentThread.ManagedThreadId}".LogInfo();
//        mre.Set();
//    });
//}
//WaitHandle.WaitAll(manualResetEvents.ToArray());

//$"线程编号:{System.Environment.CurrentManagedThreadId}".LogInfo();
"测试内容0".LogFatal();
"测试内容Program1".LogFatal<Program>();
Logger.LogFatal<Program>("测试内容Program2");
new xu.MinFileLogger.Console.TestClass().Test();

for (int i = 0; i < 100000; i++)
{
    $"线程编号:{System.Environment.CurrentManagedThreadId} -- {i}".LogInfo();
}

Console.WriteLine("结束啦!");

Console.ReadKey();